import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import titv from '@/components/titv'
import titv1 from '@/components/titv1'
import titv2 from '@/components/titv2'
import dan from '@/dan/dan'
import dan1 from '@/dan/dan1'
import dan2 from '@/dan/dan2'
import ch from '@/dan/ch' 
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },{
      path: '/xin',
      component: titv,
      children:[
        {
          path: '/',
          name: 'titv',
          component: titv,
          alias:'/jspang'
        },
        {
          path: 'x1',
          name: 'x1',
          component:  titv1
        },{
          path: 'x2',
          name: 'x2',
          component:  titv2
        }
      ]
    },{
      path: '/dan',
      name: 'dan',
      // component: dan
      components:{
        defalt:dan,
        left:dan1,
        right:dan2
      }
    },
    {
      path: '/go',
      name: 'go',
      // component: dan
      components:{
        defalt:dan,
        left:dan2,
        right:dan1
      }
    },
    {
      path: '/go2',
      name: 'go2',
      // component: dan
      components:{
        defalt:dan,
        left:dan1,
        right:dan2
      }
    },
    {
      path: '/ch',
      name: 'ch',
      // component: dan
      component:ch
      
    }
  ]
})
